<?php
/*********************************************
 *  CPG Dragonfly™ CMS
 *********************************************
	Copyright © since 2010 by CPG-Nuke Dev Team
	http://dragonflycms.org

	Dragonfly is released under the terms and conditions
	of the GNU GPL version 2 or any later version
*/

namespace Poodle;

class Report
{

	public static function notFound($message='')
	{
		self::error(404, $message);
	}

	protected static function fix_bin($s)
	{
		return str_replace('"','\\"',preg_replace('#([\x00-\x08\x0B\x0C\x0E-\x1F\x7F])#e','"\x".bin2hex("$1")', $s));
	}

	public static function error($title, $error='', $redirect=false)
	{
		$message = is_array($error) ? $error['msg'] : $error;
		cpg_error($message, $title, $redirect);
	}

	public static function confirm($msg, $hidden='', $uri=false)
	{
	}
}
